import { Directive } from "vue";

// 自适应表格高度
interface ExHTMLElement extends HTMLElement {
  resizeListener: EventListener;
};
/**
 * @description  自动focus
 */
const resizeDirective: Directive<ExHTMLElement> = {
  mounted(el, binding) {
    // console.debug(el, '这个dom')
    // console.debug(binding, '等号后面的值');
  },
  unmounted(el) {
    window.removeEventListener("resize", el.resizeListener);
  },
  updated(el, binding) {
    // 确保修改后重新设置表格高度
    requestAnimationFrame(() => {

    });
  },
};

export default resizeDirective;